package com.mlz.mlzmall.bean;

import java.io.Serializable;
import java.util.List;

/**
 * Created by jack.wang on 2015/11/14.
 */
public class CartInfo implements Serializable {
    public int status;
    public Object errors;
    public String msg;
    public List<CartDto> data;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public Object getErrors() {
        return errors;
    }

    public void setErrors(Object errors) {
        this.errors = errors;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<CartDto> getData() {
        return data;
    }

    public void setData(List<CartDto> data) {
        this.data = data;
    }

    public static class CartDto {
        public String warehouse;
        public String warehouseName;
        //全部选中
        public boolean allSeleted;
        public int type;
        public List<CartProductDto> products;
        public CartTotalDto totals;
        public double freight;
        public double tax;
        public int addressId;
        public double total;

        @Override
        public String toString() {
            return "CartDto{" +
                    "warehouse='" + warehouse + '\'' +
                    ", warehouseName='" + warehouseName + '\'' +
                    ", allSeleted=" + allSeleted +
                    ", type=" + type +
                    ", products=" + products +
                    ", toatls=" + totals +
                    ", freight=" + freight +
                    ", tax=" + tax +
                    ", addressId=" + addressId +
                    ", total=" + total +
                    '}';
        }

        public String getWarehouse() {
            return warehouse;
        }

        public void setWarehouse(String warehouse) {
            this.warehouse = warehouse;
        }

        public String getWarehouseName() {
            return warehouseName;
        }

        public void setWarehouseName(String warehouseName) {
            this.warehouseName = warehouseName;
        }

        public boolean isAllSeleted() {
            return allSeleted;
        }

        public void setAllSeleted(boolean allSeleted) {
            this.allSeleted = allSeleted;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public List<CartProductDto> getProducts() {
            return products;
        }

        public void setProducts(List<CartProductDto> products) {
            this.products = products;
        }

        public CartTotalDto getTotals() {
            return totals;
        }

        public void setTotals(CartTotalDto totals) {
            this.totals = totals;
        }

        public double getFreight() {
            return freight;
        }

        public void setFreight(double freight) {
            this.freight = freight;
        }

        public double getTax() {
            return tax;
        }

        public void setTax(double tax) {
            this.tax = tax;
        }

        public int getAddressId() {
            return addressId;
        }

        public void setAddressId(int addressId) {
            this.addressId = addressId;
        }

        public double getTotal() {
            return total;
        }

        public void setTotal(double total) {
            this.total = total;
        }
    }

    public static class CartProductDto {
        private boolean isLast;
        public int productId;
        public String name;
        public String model;
        public double refPrice;
        public double price;
        public String image;
        public String priceType;
        public int priceTypeRecordId;
        public boolean selected;
        public String href;
        public String location;
        public String areaCode;
        public int quantity;
        public int productQuantity;
        public boolean stockStatus;
        public int points;
        public int reward;
        public String taxType;
        public double weight;
        public double length;
        public double width;
        public double height;
        public int minimum;
        public double tariffRates;
        public String warehouse;
        public int type;
        public String productClass;
        public double tax;
        public double total;

        @Override
        public String toString() {
            return "CartProductDto{" +
                    "isLast=" + isLast +
                    ", productId=" + productId +
                    ", name='" + name + '\'' +
                    ", model='" + model + '\'' +
                    ", refPrice=" + refPrice +
                    ", price=" + price +
                    ", image='" + image + '\'' +
                    ", priceType='" + priceType + '\'' +
                    ", priceTypeRecordId=" + priceTypeRecordId +
                    ", selected=" + selected +
                    ", href='" + href + '\'' +
                    ", location='" + location + '\'' +
                    ", areaCode='" + areaCode + '\'' +
                    ", quantity=" + quantity +
                    ", productQuantity=" + productQuantity +
                    ", stockStatus=" + stockStatus +
                    ", points=" + points +
                    ", reward=" + reward +
                    ", taxType='" + taxType + '\'' +
                    ", weight=" + weight +
                    ", length=" + length +
                    ", width=" + width +
                    ", height=" + height +
                    ", minimum=" + minimum +
                    ", tariffRates=" + tariffRates +
                    ", warehouse='" + warehouse + '\'' +
                    ", type=" + type +
                    ", productClass='" + productClass + '\'' +
                    ", tax=" + tax +
                    ", total=" + total +
                    '}';
        }

        public boolean isLast() {
            return isLast;
        }

        public void setIsLast(boolean isLast) {
            this.isLast = isLast;
        }

        public int getProductId() {
            return productId;
        }

        public void setProductId(int productId) {
            this.productId = productId;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getModel() {
            return model;
        }

        public void setModel(String model) {
            this.model = model;
        }

        public double getRefPrice() {
            return refPrice;
        }

        public void setRefPrice(double refPrice) {
            this.refPrice = refPrice;
        }

        public double getPrice() {
            return price;
        }

        public void setPrice(double price) {
            this.price = price;
        }

        public String getImage() {
            return image;
        }

        public void setImage(String image) {
            this.image = image;
        }

        public String getPriceType() {
            return priceType;
        }

        public void setPriceType(String priceType) {
            this.priceType = priceType;
        }

        public int getPriceTypeRecordId() {
            return priceTypeRecordId;
        }

        public void setPriceTypeRecordId(int priceTypeRecordId) {
            this.priceTypeRecordId = priceTypeRecordId;
        }

        public boolean isSelected() {
            return selected;
        }

        public void setSelected(boolean selected) {
            this.selected = selected;
        }

        public String getHref() {
            return href;
        }

        public void setHref(String href) {
            this.href = href;
        }

        public String getLocation() {
            return location;
        }

        public void setLocation(String location) {
            this.location = location;
        }

        public String getAreaCode() {
            return areaCode;
        }

        public void setAreaCode(String areaCode) {
            this.areaCode = areaCode;
        }

        public int getQuantity() {
            return quantity;
        }

        public void setQuantity(int quantity) {
            this.quantity = quantity;
        }

        public int getProductQuantity() {
            return productQuantity;
        }

        public void setProductQuantity(int productQuantity) {
            this.productQuantity = productQuantity;
        }

        public boolean isStockStatus() {
            return stockStatus;
        }

        public void setStockStatus(boolean stockStatus) {
            this.stockStatus = stockStatus;
        }

        public int getPoints() {
            return points;
        }

        public void setPoints(int points) {
            this.points = points;
        }

        public int getReward() {
            return reward;
        }

        public void setReward(int reward) {
            this.reward = reward;
        }

        public String getTaxType() {
            return taxType;
        }

        public void setTaxType(String taxType) {
            this.taxType = taxType;
        }

        public double getWeight() {
            return weight;
        }

        public void setWeight(double weight) {
            this.weight = weight;
        }

        public double getLength() {
            return length;
        }

        public void setLength(double length) {
            this.length = length;
        }

        public double getWidth() {
            return width;
        }

        public void setWidth(double width) {
            this.width = width;
        }

        public double getHeight() {
            return height;
        }

        public void setHeight(double height) {
            this.height = height;
        }

        public int getMinimum() {
            return minimum;
        }

        public void setMinimum(int minimum) {
            this.minimum = minimum;
        }

        public double getTariffRates() {
            return tariffRates;
        }

        public void setTariffRates(double tariffRates) {
            this.tariffRates = tariffRates;
        }

        public String getWarehouse() {
            return warehouse;
        }

        public void setWarehouse(String warehouse) {
            this.warehouse = warehouse;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public String getProductClass() {
            return productClass;
        }

        public void setProductClass(String productClass) {
            this.productClass = productClass;
        }

        public double getTax() {
            return tax;
        }

        public void setTax(double tax) {
            this.tax = tax;
        }

        public double getTotal() {
            return total;
        }

        public void setTotal(double total) {
            this.total = total;
        }
    }

    public static class CartTotalDto {
        public  Key total;
        public  Key tax;
        public  Key sub_total;

        @Override
        public String toString() {
            return "CartTotalDto{" +
                    "total=" + total +
                    ", shipping=" + tax +
                    ", sub_total=" + sub_total +
                    '}';
        }

        public Key getTotal() {
            return total;
        }

        public void setTotal(Key total) {
            this.total = total;
        }

        public Key getTax() {
            return tax;
        }

        public void setTax(Key tax) {
            this.tax = tax;
        }

        public Key getSub_total() {
            return sub_total;
        }

        public void setSub_total(Key sub_total) {
            this.sub_total = sub_total;
        }

        public static class Key {
            public String code;
            public String title;
            public double value;
            public int sortOrder;

            @Override
            public String toString() {
                return "Key{" +
                        "code='" + code + '\'' +
                        ", title='" + title + '\'' +
                        ", value=" + value +
                        ", sortOrder=" + sortOrder +
                        '}';
            }

            public String getCode() {
                return code;
            }

            public void setCode(String code) {
                this.code = code;
            }

            public String getTitle() {
                return title;
            }

            public void setTitle(String title) {
                this.title = title;
            }

            public double getValue() {
                return value;
            }

            public void setValue(double value) {
                this.value = value;
            }

            public int getSortOrder() {
                return sortOrder;
            }

            public void setSortOrder(int sortOrder) {
                this.sortOrder = sortOrder;
            }
        }

    }

    @Override
    public String toString() {
        return "CartInfo{" +
                "status=" + status +
                ", errors=" + errors +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                '}';
    }
}



